#include <stdio.h>
#include <stdlib.h>

int main(){
	char ch;
      	FILE *fp;
        char file_name[] = "dominion.c.gcov";
	 
	//Read Mode
	fp = fopen(file_name,"r");
	
	if(fp == NULL){
      	   perror("Error while opening the file.\n");
	   exit(EXIT_FAILURE);
	}

	printf("The contents of %s file are :\n", file_name);

	while((ch = fgetc(fp)) != EOF){
	   //This if is to find where the line was not traversed
	   if(ch == '#'){      
	      printf("RED:  ");  
	      while((ch = fgetc(fp)) != '\n'){
		 printf("%c", ch);
	      }
	      printf("\n");
	   }
	}

	fclose(fp);
	return 0;
}
